package com.yidu.finance.view;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 理财类型
 */
@WebServlet("/FinanceTypeServlet")
public class FinanceTypeServlet extends HttpServlet {
	 
	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String action = request.getParameter("action");
		if("showList".equals(action)){
			showList(request,response);
		} 
	}

	
	/**
	 * 显示列表
	 * @param request
	 * @param response
	 * @throws ServletException
	 * @throws IOException
	 */
	private void showList(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		//这里写调用数据库的代码
		
		request.getRequestDispatcher("pages/financeType/list.jsp").forward(request, response);
	}


	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		 
		doGet(request, response);
	}

}
